Box: avoid recalc/reassignments, improve var names
authorDaniel Boles <dboles@src.gnome.org>
Sun, 25 Dec 2016 23:16:14 +0000 (23:16 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Sun, 25 Dec 2016 23:16:14 +0000 (23:16 +0000)
commit71bbd8881ffcb02aa8f0a3b401962152b30e3ee8
tree95aa933264a7b13e7037ba2ae2bb0d50e357ece4
parent5d101740313107fbd946f1034b6671bcbecb4517
Box: avoid recalc/reassignments, improve var names

Homogeneous branches repeated the calculation/assignment of the initial
space available to children. This avoids that by shuffling some code.

Perhaps more importantly, in doing that, I ended up with some ambiguous
names, and Company and I realised how vague the pre-existing naming was.
"size" becomes "extra_space", as this is what it represents. Conversely,
"extra" becomes "size_given_to_child" (albeit still given out in two
different ways depending on whether the Box is homogeneous). My hope is
that these sections of code are now somewhat less baffling than before!
gtk/gtkbox.c